home *** CD-ROM | disk | FTP | other *** search
PiXCL source | 1996-08-12 | 2.0 KB | 92 lines |
- Initialize:
- WinGetActive(Win$)
- UseCoordinates(PIXEL)
- UseBackGround(TRANSPARENT,192,192,192)
- DrawBackGround
- WaitInput(100) {let NT and 95 catch up}
- InfoMenu(REMOVE)
- SetMenu()
- WinLocate(Win$,250,10,620,240,Res)
- Title$ = "Message Passing App #1"
- WinTitle(Win$, Title$)
- DirGet(SourceDir$)
- WinGetClientRect("",cx1,cy1,cx2,cy2)
-
- SetMenu("E&xit!",Leave,
- ENDPOPUP,
- "&Mode",IGNORE,
- "&Transmit",Transmit,
- "&Receive",Receive,
- "&Loop",CommLoop,
- ENDPOPUP,
- "&Help",IGNORE,
- "&Concept",Concept,
- "&View Source",ViewSource,
- "&About",About,
- ENDPOPUP)
-
- Loop = 0
-
- Wait_for_Input:
- WaitInput()
-
- { NOTE: if a PXLResume message is received while the
- program is pausing at the above WaitInput(), it will
- proceed directly to the next command, and then exit. }
-
- Leave:
- End
-
- CommLoop:
- Loop = 1
-
- Goto Wait_for_Input
-
-
- Transmit:
- SetMouse(cx1,cy1,cx2,cy2,Process,X,Y)
- If Loop = 0 Then Goto Wait_for_Input
-
- Receive:
- WaitInput()
- DrawBackGround
- DrawIcon(10,10,64,64,ICON02)
- If Loop = 0 Then Goto Wait_for_Input
-
-
- Process:
- PXLResume("Message Passing App #2",Res)
- If Res = 0 Then MessageBox(OK,1,INFORMATION,"Msg Failed","Message Passing App #1",Res)
- If Loop = 1 Then Goto Receive
- Goto Wait_for_Input
-
-
- Concept:
- MessageBox(OK,1,INFORMATION,
- "This sample program demonstrates how two PiXCL
- applications can communicate with each other by
- passing a 'resume' message after a WaitInput()
- command has been issued.
-
- You can select transmit or receive ONE message at a time,
- or select LOOP, then receive or transmit, and the two
- programs will alternate sending 'resume' messages to
- each other.",
- "Message Passing",Res)
- Goto Wait_for_Input
-
- ViewSource:
- PXLFile$ = SourceDir$ + "\comms1.pxl"
- CmdLine$ = "NotePad " + PXLFile$
- Run(CmdLine$)
- Goto Wait_for_Input
-
-
- About:
- AboutUser("Message Passing with PiXCL 4.0",
- "WaitInput() and PXLResume commands.",
- "A PXL application can wait for another application to tell it to continue.")
- Goto Wait_for_Input
-
-
-